var onlyOfficeCallBack = '/onlyOfficeCallBack?'
if(netdisk != undefined &&netdisk == 1){
    onlyOfficeCallBack = '/netdisk/onlyOfficeCallBack?'
}
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
	var jztype = 'mobile';
}else{
	var jztype = 'desktop';
}
window.docEditor = new DocsAPI.DocEditor("placeholder",
    {	
		"type": jztype,
        "document": {
            "fileType": type,
            // "key": AID+'_'+userInfo.uid,
            "title": title,
            "url": url,
            "info": {
               "owner": userInfo.userName,
               "uploaded": "2021/5/17 13:57",
			   "sharingSettings": [
                    {
                        "permissions": "Full Access",
                        "user": userInfo.userName
                    }
                ],
            },
            "permissions": {
                "comment": edit,
                "download": true,
                "edit": edit,
                "fillForms": edit,
                "modifyFilter": true,
                "modifyContentControl": true,
                "review": edit
            }
        },

        "documentType": documentType,
        "editorConfig": {
            "callbackUrl": http+onlyOfficeCallBack+attUrl,
            "lang": "zh",
            "mode": "edit",
            "user": {
                "id": '1a5a196e-' + userInfo.uid,
                "name": userInfo.userName
            },
            "customization":{
                "forcesave":"true"
            }
        },
        "height": "100%",
        "width": "100%"
    });